<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">

	//定义JSON对象
	var p = {"name":"小明","age":16};
	
	console.log(p.name+"  "+p.age);
	
	//json数组
	var p1 = [{"name":"小李","age":18},{"name":"小红","age":17}];
	
	console.log(p1[0].name);
	console.log(p1[1].age);
</script>

</body>
</html>